<template>
  <el-container class="main">
    <el-main>
      <EditorMain
        :show="'hidden'">
        <Classify
          style="margin-top: 10px"
          :importRes="false"/>
      </EditorMain>
    </el-main>
  </el-container>
</template>

<script>
  import Classify from '../../components/res-list/Classify'
  import EditorMain from '../../components/EditorMain'
  import api from '../../common/api'
  import ajax from '../../common/ajax'
  import encryption from '../../common/encryption'

  let userId

  export default {
    name: "Home",
    components: {EditorMain, Classify},
    beforeRouteEnter(to, from, next) {
      next(vm => {
        vm.$store.commit('keepAlive/setKeepAlive', ['Home'])
      })
    },
    created() {
      userId=this.$route.query.userId
    },
    beforeRouteLeave(to, from, next) {
      if (to.path.indexOf('/home') > -1 || to.path.indexOf('/import-home') > -1) {
        this.$store.commit('keepAlive/setKeepAlive', [])
      } else {
        this.$store.commit('keepAlive/setKeepAlive', ['Home'])
      }
      next()
    }
  }

</script>

<style scoped>
  .main {
    min-height: 100%;
    width: 100%;
    background: #EFF3F5;
  }
</style>
